package xyz.zq.codegen.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author zq
 * @since 2020-04-05
 */
@TableName("persistent_logins")
public class PersistentLogins extends Model<PersistentLogins> {

    private static final long serialVersionUID = 1L;

    private String username;
    private String series;
    private String token;
    @TableField("last_used")
    private Date lastUsed;


    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getSeries() {
        return series;
    }

    public void setSeries(String series) {
        this.series = series;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public Date getLastUsed() {
        return lastUsed;
    }

    public void setLastUsed(Date lastUsed) {
        this.lastUsed = lastUsed;
    }

    @Override
    protected Serializable pkVal() {
        return this.series;
    }

    @Override
    public String toString() {
        return "PersistentLogins{" +
                "username=" + username +
                ", series=" + series +
                ", token=" + token +
                ", lastUsed=" + lastUsed +
                "}";
    }
}
